﻿@{
	var item = PageData[0];
}

<input name="user_id" type="hidden" value="@item.Id" />
<input name="user_username" type="hidden" value="@item.Username" />
@RenderPage("~/Shared/_PrePopInputFormField.cshtml", new { labelName = "firstName", labelDisplay = "First Name:", inputValue = item.FirstName, maxLength = 50, required = true})
@RenderPage("~/Shared/_PrePopInputFormField.cshtml", new { labelName = "lastName", labelDisplay = "Last Name:", inputValue = item.LastName, maxLength = 50, required = true})
@RenderPage("~/Shared/_PrePopInputFormField.cshtml", new { labelName = "email", labelDisplay = "E-mail:", required = true, inputValue = item.Email, validationClasses = "email", maxLength = 50})
<br/>User roles:
@foreach(string role in Roles.GetAllRoles()) 
{
       @RenderPage("~/Shared/_PrePopInputFormField.cshtml",
        new { labelName = "is" + role, labelDisplay = role, inputValue = Roles.IsUserInRole(item.Username,role).ToString(), inputType = "checkbox", required = false, disabled= (item.Username == WebSecurity.CurrentUserName && role == "admin")})
               
}
